package com.jeasonzhao.report.engine.impl;

import com.jeasonzhao.commons.logger.Logger;
import com.jeasonzhao.report.engine.irp.IDataSetProvider;
import com.jeasonzhao.report.exceptions.DataSetGenerateException;
import com.jeasonzhao.report.model.Report;

public abstract class AbstractDataSetProvider implements IDataSetProvider
{
    protected Report report = null;
    public AbstractDataSetProvider()
    {
    }

//    /**
//     *
//     * @param log LogAgent
//     * @param nPageSize int
//     * @param nCurrentPageNo int The start pageNo is 0 rather than 1
//     * @return DataSet
//     * @throws DataSetGenerateException
//     * @todo Implement this com.jeasonzhao.report.irp.IDataSetProvider method
//     */
//    public DataSet getDataSet(LogAgent log,int nPageSize,int nCurrentPageNo)
//        throws DataSetGenerateException
//    {
//        return null;
//    }

    /**
     * Invoked when reportAgent got a request
     *
     * @param log LogAgent
     * @param report Report Report
     * @throws DataSetGenerateException
     * @todo Implement this com.jeasonzhao.report.irp.IDataSetProvider method
     */
    public void setup(Logger log,Report report)
        throws DataSetGenerateException
    {
        this.report = report;
    }

    /**
     * Invoked after getDataSet
     *
     * @throws DataSetGenerateException
     * @param log LogAgent
     * @todo Implement this com.jeasonzhao.report.irp.IDataSetProvider method
     */
    public void teardown(Logger log)
        throws DataSetGenerateException
    {
    }
}
